Skip to content

Add support for multi-tenancy#8444

Merged
roger-zhangg merged 3 commits into
developfrom
mtm
Nov 20, 2025
Merged

Add support for multi-tenancy#8444
roger-zhangg merged 3 commits into
developfrom
mtm

Conversation

@licjun

@licjun licjun commented Nov 20, 2025

Copy link
Copy Markdown
Contributor

Which issue(s) does this change fix?

Add support for using sam to test multi-tenancy function.

Why is this change necessary?

AWS Lambda Multi-Tenancy is a new capability for customers who need compute isolation between tenants. Without SAM CLI support, developers can't test tenant-specific business logic locally and has to be forced on cloud deployment for every test iteration which is slow and expensive.

How does it address the issue?

  1. Added --tenant-id CLI option across SAM Commands(local invoke, local start-api, local start-lambda, remote invoke)
  2. Local Emulation Integration: Passes tenant-id to Runtime Interface Emulator (RIE) via HTTP headers
  3. Context Population: RIE/RIC integration ensures context.tenant_id is available in function code

What side effects does this change have?

N/A

Mandatory Checklist

PRs will only be reviewed after checklist is complete

Integ test run result: https://github.com/aws/aws-sam-cli/actions/runs/19521003736
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@licjun
licjun requested a review from a team as a code owner November 20, 2025 00:22
@github-actions github-actions Bot added area/local/start-api sam local start-api command area/local/invoke sam local invoke command area/local/start-invoke area/schema JSON schema file pr/internal labels Nov 20, 2025
from unittest import TestCase
from unittest.mock import Mock, patch
from parameterized import parameterized, param
import click

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably we just need
from click import Exception
But we can do it next release

@roger-zhangg
roger-zhangg added this pull request to the merge queue Nov 20, 2025
@roger-zhangg
roger-zhangg removed this pull request from the merge queue due to the queue being cleared Nov 20, 2025
@roger-zhangg
roger-zhangg added this pull request to the merge queue Nov 20, 2025
Merged via the queue into develop with commit 9d48ecc Nov 20, 2025
58 of 71 checks passed
@licjun
licjun deleted the mtm branch December 1, 2025 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/local/invoke sam local invoke command area/local/start-api sam local start-api command area/local/start-invoke area/schema JSON schema file pr/internal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants